package creational.builder;

import java.util.ArrayList;
import java.util.List;

public class Presentation {
  private final List<Slide> slides = new ArrayList<>();

  public void addSlide(Slide slide) {
    slides.add(slide);
  }

  public void export(PresentationBuilder builder) {
    builder.addSlide(new Slide("Copyright © 2023"));
    for (Slide slide : slides) {
      builder.addSlide(slide);
    }
  }
//    switch (format) {
//      case PDF:
//        System.out.println("Exporting presentation to PDF format.");
//        PdfDocument pdfDocument = new PdfDocument();
//        for (Slide slide : slides) {
//          pdfDocument.addPage(slide.getText());
//        }
//        break;
//      case HTML:
//        System.out.println("Exporting presentation to HTML format.");
//        break;
//      case MARKDOWN:
//        System.out.println("Exporting presentation to Markdown format.");
//        break;
//      case TEXT:
//        System.out.println("Exporting presentation to Text format.");
//        break;
//      case MOVIE:
//        System.out.println("Exporting presentation to Movie format.");
//        Movie movie = new Movie();
//        for (Slide slide : slides) {
//          movie.addFrame(slide.getText(), 5); // Assuming each slide lasts 5 seconds
//        }
//        break;
//      default:
//        throw new IllegalArgumentException("Unsupported format: " + format);
}
